#include <gtkmm/application.h>
#include "mainWindow.h"
#include <unistd.h>
#include <iostream>
#include <stdlib.h>
#include <cstring>
#include <fstream>

int main(int argc,char* argv[])
{
    std::ofstream tmpFile;
    tmpFile.open("/tmp/CDenvHOME",std::ios_base::trunc);
    if(tmpFile.is_open())
    {
        tmpFile<<getenv("HOME");
        tmpFile.close();
    }
    else std::cout<<"-1"<<std::endl;

    auto app=Gtk::Application::create("org.my_app.CountDown");
    return app->make_window_and_run<mainWindow>(argc,argv);
}